<?php
	

defined('_JEXEC') or die('Restricted access');


if (!JFactory::getUser()->authorise('core.manage', 'com_nbeventmap')) {
	return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR'));
}

require_once (JPATH_COMPONENT.DS.'controller.php');
require_once( JPATH_COMPONENT.DS.'helper.php' );



$controllerName = JRequest::getWord('controller');


if (!($controllerName = JRequest::getWord('controller')))
	{$controllerName = 'accueil';};


if($controllerName)
	{
   		$path = JPATH_COMPONENT.DS.'controllers'.DS.$controllerName.'.php';
    	if( file_exists($path))
    		{
        		require_once $path;
    		} else
    		{
        		$controllerName = '';
    		}
	}
$classname = 'NBEventMapsController'.$controllerName;


$controllerName = new $classname();


if (!(JRequest::getVar('task'))) {
	$task = 'view';
}else{
	$task = JRequest::getVar('task');
};
$controllerName->execute( $task );


$controllerName->redirect();


?>
